
function getAuthorization() {
  return uni.getStorageSync(`token`)
}
 
function setAuthorization(authorization) {
  return uni.setStorageSync(`token`, authorization)
}

function setRefreshAuthorization(authorization) {
  return uni.setStorageSync(`refreshToken`, authorization)
}

function getRefreshAuthorization(authorization) {
  return uni.getStorageSync(`refreshToken`)
}
 
function removeAuthorization() {
  uni.removeStorageSync(`token`)
  uni.removeStorageSync(`refreshToken`)
  uni.removeStorageSync(`user`)
}

function saveUser(user){
	return uni.setStorageSync("user",user)
}

export default {
	getAuthorization,
	setAuthorization,
	getRefreshAuthorization,
	setRefreshAuthorization,
	removeAuthorization,
	saveUser
}